package com.three.mapper;

import com.three.entity.Department;
import com.three.entity.Staff;
import com.three.vo.DeptNameAndCountsVo;

import java.util.List;

/**
 * @author 天天好心情
 * @description 针对表【department】的数据库操作Mapper
 * @createDate 2024-10-22 16:28:19
 * @Entity com.three.entity.Department
 */
public interface DepartmentMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);

    List<Department> getAll();

    //分页查询所有部门
    List<Department> getAllDept(Department department);

    //查询部门有没有人
    int selectByDeptidCount(Integer deptid);
    //根据id删除
    int deleteByDeptid(Integer deptid);
    //根据部门id查询员工信息
    List<Staff> selectStaffByDeptId(Staff staff);
    //增加部门人数
    int addCounts(Integer deptid);
    //减少部门人数
    int minusCounts(Integer deptid);
    //获取部门员工数量
    List<DeptNameAndCountsVo> getDeptStaffCounts(Integer branchid);

}
